2.1.4. Response
Field | Description | Type |
status | success | error | |
code | Error code | Integer |
message | Error text (optional) | String |
printError | Print error code (when using the cash register in case of a problem with receipt printing) | Integer |
documentID | ID of the document in the smartone Cashbox system (when using a cash register) | Integer |
fiscalID | Fiscal document code (use for return) | String |
fiscalNum | Document number | String |
docTime | Document creation date and time, format: yyyy-MM-dd hh:mm:ss | String |
printTime | Document closing date and time, format: yyyy-MM-dd hh:mm:ss | String |
docStatus | 0 - invoice not closed, 1 - invoice closed | Integer |
rrn | Transaction number of payment via bank terminal | String |
auth | Authorization code | String |
cardNum | Card number | String |
checkNum | Check number | String |
totalPayments:[{…}] | Array of document payments | Array |
totalPayments {...}
Array
Field | Description | Type |
type | Payment type code | String |
amount | Payment amount in kopecks | Integer |
Error codes
Field | Description |
0 | No error |
1 | Authorization error |
2 | Invalid JSON format |
3 | Required parameters not passed |
4 | The amount on the document does not correspond to the amount on the positions |
5 | Internal error |
6 | Shift not open |
7 | Payment type is not supported |
8 | The document is not fully paid (with automatic fiscalization) |
9 | Document not found |
11 | Change can only be issued in cash |
12 | Unacceptable tax percentage |
13 | Loan repayment can only be accepted by one type of payment at a time |
16 | Incorrect tax percentage |
18 | Returned item not found in the sale receipt. |
19 | Quantity of returned item exceeds the sale quantity considering previous returns. |
20 | Advance payment document number is not specified when required. |
21 | Item not found in the advance payment receipt. |
22 | Shift has been open longer than the allowed time limit. |
23 | Bank terminal for card payments is not connected. |
25 | Payment application for specialized payments is not connected. |
27 | There is cash remaining in the register that needs to be collected |
28 | Number of marking codes does not match the quantity of goods |
29,42 | Matrix code validation error |
30 | Product code validation error |
31 | Packaging code validation error |
32 | Missing mandatory parameter for bank transaction |
33 | Deposit balance insufficient for use |
34 | Item not available for sale |
35 | refund amount for the specified payment type exceeds the payment for that type at sale (if this control is enabled) |
Responce example:
{
"auth": "796660",
"card_num": "537541******5609",
"checkNum": "",
"documentID": 15,
"extraParams": {},
"fiscalID": "25",
"fiscalNum": "25",
"docTime": "",
"printTime": "",
"docStatus": "",
"message": "",
"rrn": "410910000017",
"shiftOrdersCnt": 0,
"status": "success"
}
Response structure:
{
"status": "success",
"code": "integer, error code",
// 0 – no error
// 1 – authorization error
// 2 – incorrect JSON format
// 3 – mandatory parameters are missing
// 4 – document total does not match item totals
// 5 – internal error
// 6 – shift is not open
// 7 – payment type is not supported
// 8 – document is not fully paid (during automatic fiscalization)
// 9 – document not found
// 11 – change can only be given for cash payment
// 12 – document time is before shift start time
// 13 – loan repayment can only be accepted with one payment type at a time
// 16 – incorrect tax percentage
// 18 – returned item not found in the sale receipt
// 19 – quantity of returned item exceeds sold quantity considering previous returns
// 20 – advance payment document number not specified when required
// 21 – item not found in the advance payment receipt
// 22 – shift has been open longer than the allowed time limit
// 23 – bank terminal for card payments is not connected
// 25 – payment application for specialized payment types is not connected
// 27 – there is cash remaining in the register that needs to be collected
// 28 – number of marking codes does not match the quantity of goods
// 29, 42 – matrix code validation error
// 30 – product code validation error
// 31 – packaging code validation error
// 32 – missing mandatory parameter for bank transaction
// 33 – deposit balance insufficient for use
// 34 – item not available for sale
"message": "string, error text (optional)",
"printError": 0,
"documentID": 0,
"fiscalID": "string, fiscal document code (use for returns)",
"fiscalNum": "string, document number",
"docTime": "string, document creation date and time, format: yyyy-MM-dd hh:mm:ss",
"printTime": "string, document closing date and time, format: yyyy-MM-dd hh:mm:ss",
"docStatus": 0,
"rrn": "string, transaction number for bank terminal payment",
"auth": "string, authorization code",
"cardNum": "string, card number",
"checkNum": "string, check number",
"totalPayments": [
{
"code": "string, payment type code",
"amount": "integer, payment amount in kopecks"
}
]
}